home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Just Call Me Internet
/
Just Call Me Internet.iso
/
archives
/
com
/
internet
/
sting
/
sting.lzh
/
STING
/
dialer
/
docs
/
fee.doc
next >
Wrap
Text File
|
1997-08-18
|
4KB
|
81 lines
The construction of a FEE file
==============================
The Dialer for STinG is able to keep track of your cost due to Internet
connections. To incorporate the charge by your telephone company it needs
some information on their cost structure, which is stored in a *.FEE file.
With that file the Dialer calculates the cost when `Disconnect' is clicked,
and writes it along with some other information into the DIAL.LOG file.
Here is how to write such a *.FEE file.
Start an ASCII editor editing a file with the extension *.FEE. You begin
with the specification of the charge unit and it's cost using the `+e' and
`+u' command. The `+e' specifies the cost as a numerical number, the `+u'
specifies the unit. For instance the sample file `LOCAL.FEE' contains the
lines :
+e 0.12
+u DM
This means that the charge unit is DM 0.12 (Deutsche Mark). Use `+u $' in
the USA, `+u A$' in Australia, etc.
Now follows the big part with specifying the periods of time which lead to
the various connection lengths of the charge unit. It has the following
structure :
+1
[time information]
+2
[time information]
+3
[time information]
...
+n
[time information]
There is no restriction on the number of time informations, or connection
lengths n. The time information itself consists of any number of lines,
each specifying a time interval that leads to the corresponding unit length.
Each line consists of three entries : A description of the day, the beginning
time and the ending time, separated by one or more spaces. The time entries
consist simply of the hour (24 hours clock !) and the minute, separated by
a colon `:'. The day description can have a number of different formats :
* It can be simply the date : <day>.<month>. (Priority 3)
* It can be deduced from Easter sunday (`E') or the First Advent (`A'),
by adding a number specifying how many days to add. (Priority 2)
* It can be deduced from each sunday (`w') by adding a number specifying
the weekday this way (i.e. Wednesday is `w(3)' ). (Priority 1)
* It can be deduced from the first day of each month (`m') by adding a
number, m(2) would match Jan, 3rd; Feb, 3rd; etc. (Priority 1)
* It can denote simply every day (`a'). (Priority 0)
The priority is needed for the case that there are conflicting entries.
For instance some country could have a public holiday on May 27th, the
phone company has reduced cost for this day, and the same for Whitsun
monday. So a user in that country would have two different lines for each
day :
...
27.5. 5:00 21:00 Holiday tariff from 5 am to 9 pm.
...
E(50) 9:00 18:00 Whitsun tariff from 9 am to 6 pm.
...
In the year 1997 it happens that Whitsun monday _is_ the 27th of May !
In that case the line starting with `27.5.' prevails because it has the
higher priority (3, while `E(50)' has priority 2).
Another single line is needed now for specifying the connection lengths
per charge unit :
# <unit length for +1> ... <unit length for +n> <tariff name>
Precisely n unit lengths must be given, each one consisting of a number,
followed by a unit `s', `m' or `h' for seconds, minutes and hours,
respectively. No space must be used between the number and the unit. A
string may follow that is included into the corresponding DIAL.LOG entry.
Normally this should be the tariff name.
For a sample *.FEE see the LOCAL.FEE which is provided with the Dialer
package.